<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/17 0017
  Time: 上午 10:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加</title>
    <link rel="stylesheet" href="/static/js/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/js/plugins/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link rel="stylesheet" href="/static/css/common.css">
    <script src="/static/js/plugins/jquery.js"></script>
    <script src="/static/js/plugins/layui/layui.js"></script>
    <script type="text/javascript" src="/static/js/plugins/zTree_v3/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="/static/js/plugins/zTree_v3/js/jquery.ztree.excheck.js"></script>
    <script type="text/javascript" src="/static/js/role/edit.js"></script>
</head>
<body>
<div class="box-padding15">
    <div class="box-border">
        <span class="layui-breadcrumb">
             <a href="/index"target="_top">首页</a>
             <a href="/role/list">角色管理</a>
             <a><cite>编辑</cite></a>
        </span>
    </div>
    <form action="/role/update" method="post"class="layui-form">
        <div class="layui-row">
            <div class="layui-col-md6">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色名称</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="id" id="id"value="${role.id}">
                        <input type="text" name="name" value="${role.name}"  lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <input type="checkbox" value="1" name="status" <c:if test="${role.status eq 1 }"> checked</c:if> title="启用">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea name="remark" placeholder="请输入内容" class="layui-textarea">${role.remark}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
                        <a href="/role/list"> <button type="button" class="layui-btn layui-btn-primary">取消</button></a>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3">
                <div class="layui-form-item">
                <label class="layui-form-label">权限</label>
                <div class="layui-input-block">
                    <input type="hidden" name="premssionIds" id="premssionIds">
                    <ul id="treeRole" class="ztree"></ul>
                </div>
            </div>
            </div>
        </div>
    </form>
</div>

</body>
</html>
